import {
	apiResquest
} from '@/utils/http.js'
// 获取openid和unionids
export const GetUnionid = (params) => {
	return apiResquest({
		url: 'user/app/wxGetUnionid',
		method: 'post',
		data: params
	})
}
// 注册
export const Register = (params) => {
	return apiResquest({
		url: 'user/app/register',
		method: 'post',
		data: params
	})
}

// 登录
export const Login = (params) => {
	return apiResquest({
		url: 'user/app/login',
		method: 'post',
		data: params
	})
}

// 重置密码
export const ChangeDensity = (params) => {
	return apiResquest({
		url: 'user/app/changeDensity',
		method: 'post',
		data: params
	})
}

// 完善信息
export const PerfectInfo = (params) => {
	return apiResquest({
		url: 'user/app/perfectInformation',
		method: 'post',
		data: params
	})
}
// App微信登录
export const AppWechatRegister = (params) => {
	console.log('-------------------', 'user/app/appRegister', params)
	return apiResquest({
		url: 'user/app/appRegister',
		method: 'post',
		data: params
	})
}
// App微信注册
export const AppWechatLogin = (params) => {
	console.log('-------------------', 'user/app/appLogin', params)
	return apiResquest({
		url: 'user/app/appLogin',
		method: 'post',
		data: params
	})
}
// 通过code获取unionid
export const CodetoUnionid = (params) => {
	return apiResquest({
		url: 'user/app/xcxRegister',
		method: 'post',
		data: params
	})
}
// 个推cid
export const UpdateCid = (params) => {
	return apiResquest({
		url: 'user/app/updateCid',
		method: 'post',
		data: params
	})
}
// 用户协议
export const userAgreement = (params) => {
	return apiResquest({
		url: 'user/app/getAgreement',
		method: 'get',
		data: params
	})
}